import os

from selenium import webdriver
import time
from selenium.webdriver.common.by import By

driver =webdriver.Chrome()
path =os.path.join(os.path.dirname(__file__),'html3','upload_file.html')
path =os.path.join(os.path.abspath('html3'),'upload_file.html')
path2=os.path.abspath('01配置浏览器.py')
driver.get(path)

driver.maximize_window()
a=driver.find_element(By.NAME,'file')
a=driver.find_element(By.XPATH,'//input')
a.send_keys(path2)

time.sleep(3)
driver.quit()

